<template name="channel_info_panel_update">
  <div class="position-relative">
    <div class="position-absolute" style="bottom: 2rem;right: 1rem;">
      <button type="button" class="btn btn-light" id="upload-channel-cover">上传新的封面</button>
    </div>
    <img class="img-fluid rounded mb-3" id="upload-channel-cover-img" src="{{channel.cover}}">
    <input class="d-none" type="file" accept="image/png,image/jpeg" id="upload-channel-cover-input">
    <!-- upload modal -->
    {{> channel_crop_cover}}
  </div>
  
  <div class="form-group">
    <label for="update-channel-name">频道名称</label>
    <input type="text" class="form-control" id="update-channel-name" placeholder="频道名称" value="{{channel.name}}">
    <small class="text-danger" id="update-channel-name-help"></small>
  </div>

  <div class="form-group">
    <label for="update-channel-notes">频道描述</label>
    <textarea class="form-control" id="update-channel-notes" rows="3" placeholder="频道描述">{{channel.notes}}</textarea>
    <small class="text-danger" id="update-channel-notes-help"></small>
  </div>

  {{> createChannelInfoType label="频道类型" id=channel.type.name}}
  {{> createChannelInfoNumberOfPeople label="预期规模" id=channel.numberOfPeople.name}}
  {{> createChannelInfoPolicy label="频道权限" id=channel.policy.name}}
  {{> createChannelInfoApplyPolicy apply=channel.policy.apply}}

  <button type="button" class="btn btn-primary btn-block" id="save-channel-update">保存</button>
  <button type="button" class="btn btn-secondary btn-block" id="cancel-channel-update">取消</button>
</template>